<template>
    <div>
        <el-form :inline="true" :model="formInline" label-position="right" label-width="80px" class="demo-form-inline" size="mini">
            <el-form-item label="传输标识">
                <el-input v-model="formInline.msgId" placeholder="传输标识" class="input-width" size="mini"></el-input>
            </el-form-item>
            <el-form-item label="业务主键">
                <el-input v-model="formInline.businessVal" placeholder="业务主键" class="input-width" size="mini"></el-input>
            </el-form-item>
            <el-form-item label="交接单号">
                <el-input v-model="formInline.deliveryPlanCode" placeholder="交接单号" class="input-width" size="mini"></el-input>
            </el-form-item>
            <el-form-item label="图号">
                <el-input v-model="formInline.itemCode" placeholder="图号" class="input-width" size="mini"></el-input>
            </el-form-item>
            <el-form-item label="成品型号">
                <el-input v-model="formInline.mProductNumber" placeholder="成品型号" class="input-width" size="mini"></el-input>
            </el-form-item>
            <el-form-item label="质量编号">
                <el-input v-model="formInline.qualityCode" placeholder="质量编号" class="input-width" size="mini"></el-input>
            </el-form-item>
            <el-form-item label="条码">
                <el-input v-model="formInline.barcode" placeholder="条码" class="input-width" size="mini"></el-input>
            </el-form-item>
            <el-form-item label="合格证">
                <el-input v-model="formInline.mesCheckQualiticationId" placeholder="合格证" class="input-width" size="mini"></el-input>
            </el-form-item>
            <el-form-item label="反馈类型">
                <el-select v-model="formInline.issuedType" class="input-width" placeholder="反馈类型">
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="反馈结果">
                <el-select v-model="formInline.result" class="input-width" placeholder="反馈结果">
                    <el-option v-for="item in feedResult" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="调用日期">
                <el-date-picker  v-model="formInline.startTime" type="datetime" placeholder="选择开始日期"  default-time="00:00:00" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>到
                <el-date-picker  v-model="formInline.endTime" type="datetime" placeholder="选择结束日期"  default-time="23:59:59" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="query" size="mini">查询</el-button>
            </el-form-item>
        </el-form>
    </div>
</template>
<script>
export default {
    name:"ErpLogQueryTable",
    data(){
        return{
            formInline:{
                msgId:"",
                issuedType:"",
                itemCode:"",
                qualityCode:"",
                barcode:"",
                deliveryPlanCode:"",
                mesCheckQualiticationId:"",
                startTime:"",
                endTime:"",
                result:"",
                businessVal:"",
                isQueryDelivery:""
            },
            options:[{
                label:"成品扫码移交",
                value:"101-ERP-scanDeliveryCp"
            },{
                label:"零件扫码移交",
                value:"101-ERP-scanDeliveryLj"
            },{
                label:"标准件扫码移交",
                value:"101-ERP-scanDeliveryBzj"
            },{
                label:"零件扫码接收",
                value:"101-ERP-scanRecieveLj"
            },{
                label:"成品扫码接收",
                value:"101-ERP-scanRecieveCp"
            },{
                label:"标准件接收",
                value:"101-ERP-scanRecieveBzj"
            },{
                label:"零件预上账",
                value:"ERP-101-preConfirmLj"
            },{
                label:"成品预上账",
                value:"ERP-101-preConfirmCp"
            },{
                label:"标准件预上账",
                value:"ERP-101-preConfirmBzj"
            },{
                label:"MES-101扫码移交",
                value:"MES-101-ShopMaterialDelivery"
            },{
                label:"MES-101现场驳回",
                value:"MES-101-ShopReturnMaterial"
            },{
                label:"MES-101专业厂接收",
                value:"MES-101-ShopMaterialRece"
            },{
                label:"MES-101物料正常退库",
                value:"101-ERP-itemBackToMsms4LjCp"
            },{
                label:"MES-101二次配套",
                value:"MES-101-SendSecondMatch"
            },{
                label:"MES-101物料变更",
                value:"MES-101-SenceMaterialBg"
            },{
                label:"MES-101现场物料检验",
                value:"MES-101-MakeMaterialCheck"
            },{
                label:"成品删除预上账",
                value:"ERP-101-delConfirmCp"
            },{
                label:"零件删除预上账",
                value:"ERP-101-delConfirmLj"
            },{
                label:"标准件删除预上账",
                value:"ERP-101-delConfirmBzj"
            },{
                label:"ERP出库占用",
                value:"ERP-101-InvOutAllot"
            },{
                label:"ERP出库占用取消",
                value:"ERP-101-InvOutAllotCancel"
            },{
                label:"ERP出库",
                value:"ERP-101-InvOut"
            },{
                label:"ERP出库撤销",
                value:"ERP-101-InvOutCancel"
            },{
                label:"ERP退库反馈信息",
                value:"ERP-101-returnApplyReceived"
            },{
                label:"定时任务重推",
                value:"Scheduled"
            }],
            feedResult:[{
                label:"全部",
                value:"all"
            },{
                label:"成功",
                value:"1" 
            },{
                label:"失败",
                value:"0" 
            }]
        }
    },
    methods:{
        query:function(){
            if(this.formInline.itemCode!=""||this.formInline.qualityCode!=""||this.formInline.barcode!=""
                ||this.formInline.deliveryPlanCode!=""||this.formInline.mesCheckQualiticationId!=""){
                this.formInline.isQueryDelivery = "queryDeliveryParam";//是否交接单字段查询
            }else{
                this.isQueryDelivery = "";
            }
            this.$bus.$emit("querySendData",this.formInline);
        }
    }
}
</script>
<style>
.input-width {
    width:140px;
}
</style>